"""
base类：存放所有page页面公共操作方法
"""
from selenium.webdriver.support.wait import WebDriverWait
class Base:
    def  __init__(self,driver):
        self.driver=driver
    def  base_find(self,loc,time=20,pinlv=2):
        return WebDriverWait(self.driver,time,pinlv).until(lambda x:x.find_element(*loc))
    def  base_input(self,loc,value):
        el=self.base_find(loc)
        el.clear()
        el.send_keys(value)
    def base_click(self,loc):
        self.base_find(loc).click()
    def base_get_text(self,loc):
        return self.base_find(loc).text
